/*
 * IpMaskChecker.h
 *
 *  Created on: 13.11.2011
 *      Author: Pavel Sinay
 */

#ifndef IPMASKCHECKER_H_
#define IPMASKCHECKER_H_

#include <string>
#include <stdint.h>

enum Result {
	result_yes, result_no, result_error
};

class IpMaskChecker {
public:
	IpMaskChecker();
	virtual ~IpMaskChecker();
	Result check(const std::string &mask, const std::string &ip1,
			const std::string &ip2);

private:
	Result parse_ip(std::string ip_str, uint32_t &ip);
};

#endif /* IPMASKCHECKER_H_ */
